package com.wlcorp.forcazamis.sys;

import java.io.Serializable;


/** 
 ************************************************
 * @file: BaseBean.java
 * @Copyright: 2007 HundSun Electronics Co.,Ltd.
 * All right reserved.
 ************************************************
 * @package: com.hs.brmims.sys
 * @class: BaseBean
 * @description: 
 * 
 * @author: 
 * @since: 2007-9-7-15:20:05
 * @history:
 * $Id: BaseBean.java,v 1.5 2007/09/19 01:29:41 lining Exp $
**/
public class BaseBean implements Serializable {

	private static final long serialVersionUID = 1L;

	public static final int PAGE_RECORD_COUNT = 15;

	private int page;
	
	private Integer numPerPage;

	private Integer minRownum;

	private String langType;

	private String sortField;

	private String sortType;

	private boolean allowInsert;

	private boolean allowModify;

	private boolean allowDelete;

	private boolean allowDefine;
	//查询条件，可以自由添加一些特殊的查询
	private String searchCondition;
	/*当前Bean被执行结果,0：执行成功，否则执行失败*/
	private int status = 0;
	/*当前bean被执行结果信息*/
	private String msg ="";

	public int getPage() {
		return page;
	}

	public void setPage(int page,int pageCount) {
		if (page==0) {
			this.page = 1;
		} else {
			this.page = page;
		}
		this.numPerPage = new Integer(pageCount);
		this.minRownum = new Integer(pageCount*(this.page-1));
	}
	
	public void setPage(Integer page){
		this.page=page;
	}
	
	public boolean isAllowDefine() {
		return allowDefine;
	}

	public void setAllowDefine(boolean allowDefine) {
		this.allowDefine = allowDefine;
	}

	public boolean isAllowDelete() {
		return allowDelete;
	}

	public void setAllowDelete(boolean allowDelete) {
		this.allowDelete = allowDelete;
	}

	public boolean isAllowInsert() {
		return allowInsert;
	}

	public void setAllowInsert(boolean allowInsert) {
		this.allowInsert = allowInsert;
	}

	public boolean isAllowModify() {
		return allowModify;
	}

	public void setAllowModify(boolean allowModify) {
		this.allowModify = allowModify;
	}

	public String getSortField() {
		return sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField;
	}

	public String getSortType() {
		return sortType;
	}

	public void setSortType(String sortType) {
		this.sortType = sortType;
	}

	public String getLangType() {
		return langType;
	}

	public void setLangType(String langType) {
		this.langType = langType;
	}

	public Integer getNumPerPage() {
		return numPerPage;
	}

	public void setNumPerPage(Integer numPerPage) {
		this.numPerPage = numPerPage;
	}

	public Integer getMinRownum() {
		return minRownum;
	}

	public void setMinRownum(Integer minRownum) {
		this.minRownum = minRownum;
	}

	/**
	 * @return Returns the msg.
	 */
	public String getMsg() {
		return msg;
	}

	/**
	 * @param msg The msg to set.
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}

	/**
	 * @return Returns the status.
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * @param status The status to set.
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	public String isSearchCondition() {
		return searchCondition;
	}

	public void setSearchCondition(String searchCondition) {
		this.searchCondition = searchCondition;
	}
    
}
